package sinProblemNoExecutor;

import java.util.ArrayList;
import java.util.List;

public class MyTask implements Runnable {
	private static final List<Double> list = new ArrayList<Double>();
	private int[] buffer;

	public MyTask() {

	}

	public MyTask(int[] buffer) {
		this.buffer = buffer;

	}

	@Override
	public void run() {
		double sum = new CalcSumSin().calcSumSin(buffer);
		list.add(sum);
	}

	public List<Double> getStaticList() {
		return list;
	}

	public double sumTheList(List<Double> list) {
		double result = 0;
		for (Double res : list) {
			result += res;
		}
		return result;
	}
}
